/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package testing;

import clasificador.genetico.PoliticaSeleccion;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import utils.Weighted;

/**
 *
 * @author Simply
 */
public class Eugenics implements PoliticaSeleccion<ArrayList<Character>> {
    int size;    

    public Eugenics(int size) {
        this.size = size;
    }
    
    @Override
    public void seleccionar(ArrayList<Weighted<ArrayList<Character>>> poblacion) {
        for(int i = poblacion.size()-1; i >= size; i--)
        {
            poblacion.remove(i);            
        }
    }
}
